<div id="content">
    <div class="grid_container">
        <div class="grid_12">
            <div class="widget_wrap">
                <div class="widget_top">
                    <span class="h_icon list">
                    </span>
                    <h6>
                        TRIAGE
                    </h6>
                </div>
                <div class="widget_content">
                    <div class=" page_content">
                        <div class="invoice_container">
                            <div class="invoice_action_bar">
                                <div class="btn_30_light">
                                    <a href="#" title="Pay Now"><span class="icon zone_money_co"></span></a>
                                </div>
                                <div class="btn_30_light">
                                    <a href="#" title="Print"><span class="icon printer_co"></span></a>
                                </div>
                                <div class="btn_30_light">
                                    <a href="#" title="Download .pdf"><span class="icon drive_disk_co"></span></a>
                                </div>
                            </div>
                            <div class="grid_6 invoice_num">
                                <span>
                                    <?php echo $ficha['Paciente']['nombres'] . ' ' . $ficha['Paciente']['ap_paterno'] . ' ' . $ficha['Paciente']['ap_materno'] ?>
                                </span>
                            </div>

                            <div class="grid_4 invoice_date">
                                EDAD: <?php echo $edad; ?> a&ntilde;os
                            </div>
                            <span class="clear">
                                &nbsp;
                            </span>
                            <div class="grid_4 invoice_date">
                                FECHA CONSULTA:
                                <?php echo $ficha['Consultasexterna']['fecha']; ?>
                            </div>
                            <div class="grid_4 invoice_date">

                                HORA:
                                <?php echo $ficha['Consultasexterna']['hora'] ?>
                            </div>
                            <span class="clear">
                                &nbsp;
                            </span>
                            <div class="grid_3 invoice_title">
                                <h5>
                                    Motivo consulta:
                                </h5>
                            </div>
                            <div class="grid_6 invoice_num">
                                <span>
                                    <?php echo $ficha['Consultasexterna']['motivo'] ?>
                                </span>
                            </div>
                            <span class="clear">
                            </span>


                            <div class="grid_12">
                                <!-- <form action="#" method="post" id="form103" class="form_container left_label valid_tip">-->
                                <?php
                                echo $this->
                                Form->create('Paciente', array('id' => "form103", 'action' => 'motivoconsulta', 'class' => "form_container left_label valid_tip"))
                                ?>
                                <div class="widget_wrap">
                                    <div class="widget_top">
                                        <span class="h_icon list">
                                        </span>
                                        <h6>
                                            REGISTRO SIGNOS y S&Iacute;NTOMAS
                                        </h6>
                                    </div>
                                    <div class="widget_content">
                                        <ul>
                                            <li>
                                                <label class="field_title">Tipo de sintoma</label>
                                                <div class="form_input">
                                                    <div class="form_grid_12">
                                                        <select data-placeholder="Seleccione el sintoma general..." class="chzn-select full" name="data[ConceptosPaciente][trauma_id]" tabindex="1" id="principalsintoma">
                                                            <option value=""></option>
                                                            <?php foreach ($triages as $s): ?>
                                                                <option value="<?php echo $s['Trauma']['id'] ?>">
                                                                    <?php echo $s['Trauma']['nombre'] ?>
                                                                </option>
                                                            <?php endforeach; ?>
                                                        </select>
                                                        <span class=" label_intro">principal sintoma</span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li>
                                                <div id="sintomas" class="form_grid_12">
                                                    <label class="field_title">Signos presentes</label>
                                                    <?php
                                                    $i = 0;
                                                    foreach ($sintomas as $s):
                                                        ?>

                                                        <div class="form_grid_12">

                                                            <label class="field_title" style="background: <?php echo $s['Alerta']['estilo'] ?>">
                                                                <?php echo $s['Concepto']['signo'] ?>
                                                            </label>
                                                            <div class="form_input">
                                                                <span >
                                                                    <input name="data[ConceptosPaciente][<?php echo $i ?>][concepto_id]" class="checkbox" type="checkbox" value="<?php echo $s['Concepto']['id'] ?>" tabindex="2">
                                                                </span>
                                                            </div>
                                                        </div>
                                                        <br/>
                                                        <?php
                                                        $i++;
                                                    endforeach;
                                                    ?>
                                                </div>
                                            </li>

                                            <li>
                                                <div class="form_grid_12">
                                                    <div class="form_input">
                                                        <button type="submit" class="btn_small btn_blue">
                                                            <span>
                                                                Guardar sintomas
                                                            </span>
                                                        </button>
                                                        <button type="reset" class="btn_small btn_orange">
                                                            <span>
                                                                Limpiar datos
                                                            </span>
                                                        </button>
                                                    </div>
                                                </div>
                                            </li>
                                            <li>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                </form>
                            </div>
                            <span class="clear">
                            </span>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <span class="clear">
    </span>
</div>
<script>
    $(document).ready(function() {
        $("#principalsintoma").change(function() {
            console.log('selecciono ciudad' + this.value);
            $('#sintomas').load('<?php echo $this->Html->url(array('action' => 'ajaxsintomas')) ?>/' + this.value);
        });
    });
</script>
